export default url => {
    const crud = window.$crud(url)
    crud.getList = (companyId) => window.$axios({
        url: `${url}s/${companyId}`,
        method: 'get'
    })

    const getDepartments = (ids) => window.$axios({
        url: `${url}s`,
        method: 'post',
        data:{ids}
    })

    crud.syncData = (startTime) => window.$axios({
        url: `other/organizes/syncdepts`,
        method: 'post',
        params:{startTime:startTime},
    })

    return {
        ...crud,
        getDepartments
    }
}